# -*- coding: utf-8 -*-
# @Time    : 2021/9/15 23:29
# @Author  : BrandonGT
# @FileName: 10_1_learning_python.py

file_path = r"learning_python.txt"

with open(file_path) as file_object:
    # contents = file_object.read()
    # print("Following is printing 3 times")
    # print(f"{contents.strip()}\n\n" * 3)

    contents = ""
    for line in file_object:
        contents += line.replace("Python", "C")
    print("Following is printing by readline")
    print(contents)

#     lines = file_object.readlines()
#
# contents = ""
# for line in lines:
#     contents += line.strip()
# print(contents)